package com.leyou.item.inter.pojo;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @数表名称 tb_category
 * @开发日期 2020-03-03
 */
@Data
@Table(name="tb_category")
@ApiModel(value = "Category",description = "结果类")
public class Category implements Serializable {
    
    /** 类目id (主健ID) */
    @Id
    @Column(name="id")
    @ApiModelProperty(value = "类目id", name = "id")
    private Long id;

    /** 类目名称 */
    @Column(name="name")
    @ApiModelProperty(value = "类目名称", name = "name")
    private String name;

    /** 父类目id,顶级类目填0 */
    @Column(name="parent_id")
    @ApiModelProperty(value = "父类目id,顶级类目为0", name = "parentId")
    private Long parentId;

    /** 是否为父节点，0为否，1为是 */
    @Column(name="is_parent")
    @ApiModelProperty(value = "是否为父节点，0为否(false)，1为是(true)", name = "isParent")
    private Boolean isParent;

    /** 排序指数，越小越靠前 */
    @Column(name="sort")
    @ApiModelProperty(value = "排序指数，越小越靠前", name = "sort")
    private Integer sort;

    /** 该组下的所有规格参数集合 */
    @Transient
    private List<Category> list;

    private static final long serialVersionUID = 1L;
}